<?php
require_once("db.php");
require_once("function.php");
require_once("global.php");

//$db = new db();
//$db->connect();
//$a = $db->execute("insert into user (id,username,password,type) values (1,'admin','admin',1)");
//print_r($a);

$dbc = new PDO('sqlite:../data/mrb.db');

$t = $dbc->prepare("select * from user");
$t->execute();
$res = array();
$res = $t->fetchAll();
print_r($res);
//try {
//$a = $dbc->exec("INSERT INTO user VAULES (1,'admin','admin',1)");
//echo 'asdf';
//} catch(PDOException $e) {
//	echo $e->getMessage();
//}

//$dbc->exec("INSERT INTO user VALUES (1,'admin','admin',1)") or die(print_r($dbc->errorInfo(), true));
////$dbc->commit();
//echo $a;
//
//$t = $dbc->prepare("select * from user");
//$t->execute();
//$res = array();
//$res = $t->fetchAll();
//print_r($res);